package com.xyxeshang.es.music.backend.controller;

import com.xyxeshang.es.music.backend.annotation.JwtCheck;
import com.xyxeshang.es.music.backend.service.AdminService;
import com.xyxeshang.es.music.backend.util.ResultUtil;
import org.apache.ibatis.jdbc.Null;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author xyx-Eshang
 */
@CrossOrigin
@RestController
@RequestMapping("/admin")
public class AdminController {

	@Resource
	AdminService service;

	/**
	 * 刷新榜单
	 *
	 * @return
	 */
	@JwtCheck
	@GetMapping("/refreshBillboard")
	public ResultUtil<Null> refreshBillboard() {
		return service.refreshBillboard();
	}
}
